3.164 \(\int (f x)^m (d+e x) (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=95 \[ \frac{d (f x)^{m+1} \left (a+b \log \left (c x^n\right )\right )}{f (m+1)}+\frac{e (f x)^{m+2} \left (a+b \log \left (c x^n\right )\right )}{f^2 (m+2)}-\frac{b d n (f x)^{m+1}}{f (m+1)^2}-\frac{b e n (f x)^{m+2}}{f^2 (m+2)^2} \]

[Out]

-((b*d*n*(f*x)^(1 + m))/(f*(1 + m)^2)) - (b*e*n*(f*x)^(2 + m))/(f^2*(2 + m)^2) + (d*(f*x)^(1 + m)*(a + b*Log[c
*x^n]))/(f*(1 + m)) + (e*(f*x)^(2 + m)*(a + b*Log[c*x^n]))/(f^2*(2 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0812859, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {43, 2350} \[ \frac{d (f x)^{m+1} \left (a+b \log \left (c x^n\right )\right )}{f (m+1)}+\frac{e (f x)^{m+2} \left (a+b \log \left (c x^n\right )\right )}{f^2 (m+2)}-\frac{b d n (f x)^{m+1}}{f (m+1)^2}-\frac{b e n (f x)^{m+2}}{f^2 (m+2)^2} \]

Antiderivative was successfully verified.

[In]

Int[(f*x)^m*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

-((b*d*n*(f*x)^(1 + m))/(f*(1 + m)^2)) - (b*e*n*(f*x)^(2 + m))/(f^2*(2 + m)^2) + (d*(f*x)^(1 + m)*(a + b*Log[c
*x^n]))/(f*(1 + m)) + (e*(f*x)^(2 + m)*(a + b*Log[c*x^n]))/(f^2*(2 + m))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = IntHide[(f*x)^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x,
 x], x], x] /; ((EqQ[r, 1] || EqQ[r, 2]) && IntegerQ[m] && IntegerQ[q - 1/2]) || InverseFunctionFreeQ[u, x]] /
; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[2*q] && ((IntegerQ[m] && IntegerQ[r]) || IGtQ[q, 0])

Rubi steps

\begin{align*} \int (f x)^m (d+e x) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac{d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac{e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}-(b n) \int (f x)^m \left (\frac{d}{1+m}+\frac{e x}{2+m}\right ) \, dx\\ &=\frac{d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac{e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}-(b n) \int \left (\frac{d (f x)^m}{1+m}+\frac{e (f x)^{1+m}}{f (2+m)}\right ) \, dx\\ &=-\frac{b d n (f x)^{1+m}}{f (1+m)^2}-\frac{b e n (f x)^{2+m}}{f^2 (2+m)^2}+\frac{d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac{e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}\\ \end{align*}

Mathematica [A]  time = 0.0681797, size = 64, normalized size = 0.67 \[ x (f x)^m \left (\frac{d \left (a+b \log \left (c x^n\right )\right )}{m+1}+\frac{e x \left (a+b \log \left (c x^n\right )\right )}{m+2}-\frac{b d n}{(m+1)^2}-\frac{b e n x}{(m+2)^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^m*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

x*(f*x)^m*(-((b*d*n)/(1 + m)^2) - (b*e*n*x)/(2 + m)^2 + (d*(a + b*Log[c*x^n]))/(1 + m) + (e*x*(a + b*Log[c*x^n
]))/(2 + m))

________________________________________________________________________________________

Maple [C]  time = 0.187, size = 1122, normalized size = 11.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(e*x+d)*(a+b*ln(c*x^n)),x)

[Out]

b*x*(e*m*x+d*m+e*x+2*d)/(1+m)/(2+m)*exp(1/2*m*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*
x)^2*csgn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(f)+2*ln(x)))*ln(x^n)-1/2*x*(-8*a*d-2*a*d*m^3-10*a*e*m
*x+5*I*Pi*b*d*m^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-5*I*Pi*b*e*m*x*csgn(I*x^n)*csgn(I*c*x^n)^2+8*b*d*n-16*a*
d*m-4*ln(c)*b*e*x-4*I*Pi*b*e*m^2*x*csgn(I*c*x^n)^2*csgn(I*c)-I*Pi*b*e*m^3*x*csgn(I*x^n)*csgn(I*c*x^n)^2+I*Pi*b
*d*m^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-2*ln(c)*b*e*m^3*x-8*ln(c)*b*e*m^2*x-10*ln(c)*b*e*m*x+I*Pi*b*e*m^3*x
*csgn(I*c*x^n)^3+4*I*Pi*b*e*m^2*x*csgn(I*c*x^n)^3-5*I*Pi*b*d*m^2*csgn(I*x^n)*csgn(I*c*x^n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^3*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*m^3*csgn(I*c*x^n)^2*csgn(I*c)-4*a*e*x+2*b*e*
n*x)/(2+m)^2/(1+m)^2*exp(1/2*m*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-
I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(f)+2*ln(x)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.43297, size = 558, normalized size = 5.87 \begin{align*} \frac{{\left ({\left (a e m^{3} + 4 \, a e m^{2} + 5 \, a e m + 2 \, a e -{\left (b e m^{2} + 2 \, b e m + b e\right )} n\right )} x^{2} +{\left (a d m^{3} + 5 \, a d m^{2} + 8 \, a d m + 4 \, a d -{\left (b d m^{2} + 4 \, b d m + 4 \, b d\right )} n\right )} x +{\left ({\left (b e m^{3} + 4 \, b e m^{2} + 5 \, b e m + 2 \, b e\right )} x^{2} +{\left (b d m^{3} + 5 \, b d m^{2} + 8 \, b d m + 4 \, b d\right )} x\right )} \log \left (c\right ) +{\left ({\left (b e m^{3} + 4 \, b e m^{2} + 5 \, b e m + 2 \, b e\right )} n x^{2} +{\left (b d m^{3} + 5 \, b d m^{2} + 8 \, b d m + 4 \, b d\right )} n x\right )} \log \left (x\right )\right )} e^{\left (m \log \left (f\right ) + m \log \left (x\right )\right )}}{m^{4} + 6 \, m^{3} + 13 \, m^{2} + 12 \, m + 4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

((a*e*m^3 + 4*a*e*m^2 + 5*a*e*m + 2*a*e - (b*e*m^2 + 2*b*e*m + b*e)*n)*x^2 + (a*d*m^3 + 5*a*d*m^2 + 8*a*d*m +
4*a*d - (b*d*m^2 + 4*b*d*m + 4*b*d)*n)*x + ((b*e*m^3 + 4*b*e*m^2 + 5*b*e*m + 2*b*e)*x^2 + (b*d*m^3 + 5*b*d*m^2
 + 8*b*d*m + 4*b*d)*x)*log(c) + ((b*e*m^3 + 4*b*e*m^2 + 5*b*e*m + 2*b*e)*n*x^2 + (b*d*m^3 + 5*b*d*m^2 + 8*b*d*
m + 4*b*d)*n*x)*log(x))*e^(m*log(f) + m*log(x))/(m^4 + 6*m^3 + 13*m^2 + 12*m + 4)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**m*(e*x+d)*(a+b*ln(c*x**n)),x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [B]  time = 1.29936, size = 293, normalized size = 3.08 \begin{align*} \frac{b f^{m} m n x^{2} x^{m} e \log \left (x\right )}{m^{2} + 4 \, m + 4} + \frac{b d f^{m} m n x x^{m} \log \left (x\right )}{m^{2} + 2 \, m + 1} + \frac{2 \, b f^{m} n x^{2} x^{m} e \log \left (x\right )}{m^{2} + 4 \, m + 4} - \frac{b f^{m} n x^{2} x^{m} e}{m^{2} + 4 \, m + 4} + \frac{b f^{m} x^{2} x^{m} e \log \left (c\right )}{m + 2} + \frac{b d f^{m} n x x^{m} \log \left (x\right )}{m^{2} + 2 \, m + 1} - \frac{b d f^{m} n x x^{m}}{m^{2} + 2 \, m + 1} + \frac{a f^{m} x^{2} x^{m} e}{m + 2} + \frac{\left (f x\right )^{m} b d x \log \left (c\right )}{m + 1} + \frac{\left (f x\right )^{m} a d x}{m + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*f^m*m*n*x^2*x^m*e*log(x)/(m^2 + 4*m + 4) + b*d*f^m*m*n*x*x^m*log(x)/(m^2 + 2*m + 1) + 2*b*f^m*n*x^2*x^m*e*lo
g(x)/(m^2 + 4*m + 4) - b*f^m*n*x^2*x^m*e/(m^2 + 4*m + 4) + b*f^m*x^2*x^m*e*log(c)/(m + 2) + b*d*f^m*n*x*x^m*lo
g(x)/(m^2 + 2*m + 1) - b*d*f^m*n*x*x^m/(m^2 + 2*m + 1) + a*f^m*x^2*x^m*e/(m + 2) + (f*x)^m*b*d*x*log(c)/(m + 1
) + (f*x)^m*a*d*x/(m + 1)